package com.ychug.framework.business.consts;

import com.ychug.common.constant.Global;
import com.ychug.framework.business.service.CmsSiteService;
import com.ychug.framework.util.SpringUtils;
import com.ychug.service.cms.entity.CmsSiteEntity;

public final class FrontConst {


	/** 站点存放到session中 **/
	public static final String  VERSION= "OFCMS";
	public static final String  TEMPLATE_PATE= "/";
	public static final String SITE_SESSION = "site";
    public static final String DIRECTIVE_PREFIX = "mcp";
	/**  错误页面404 */
	public static String pageError = "/404.html";

	public static CmsSiteEntity cmsSiteEntity;


	//PC端获取模板路径 template-pc-path
	public static String getTemplateGlobal_Pc_Path()
	{
		return Global.getConfig("genstatic.template-pc-path");
	}

	//app端获取模板路径 template-app-path
	public static String getTemplateGlobal_App_Path()
	{
		return Global.getConfig("genstatic.template-app-path");
	}

	//PC端获取模板路径 template-pc-path
	public static String getTemplateGlobal_Pc_Out_Path()
	{
		return Global.getConfig("genstatic.template-pc-out-path");
	}

	//app端获取模板路径 template-app-path
	public static String getTemplateGlobal_App_Out_Path()
	{
		return Global.getConfig("genstatic.template-app-out-path");
	}


	public static CmsSiteEntity getCmsSiteEntity() {
		CmsSiteService cmsSiteService = SpringUtils.getBean(CmsSiteService.class);
		return cmsSiteService.getCmsSiteEntity();
	}

	public static void setCmsSiteEntity(CmsSiteEntity cmsSiteEntity) {

		FrontConst.cmsSiteEntity = cmsSiteEntity;
	}
}
